package com.bsj.power.common.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bsj.power.common.def.dto.menu.MenuSearchDTO;
import com.bsj.power.common.def.entity.menu.Menu;
import org.springframework.stereotype.Repository;

import java.util.List;

/***
 * @description MenuMapper
 * @author LiJiaXin
 * @version 1.0.0
 * @time 2024/1/11 14:33
 **/
@Repository
//@DS("master")
public interface MenuMapper extends BaseMapper<Menu> {

    /**
     * 根据角色id查询权限列表
     *
     * @param roleId
     * @return java.util.List<com.bsj.travel.def.common.VO.MenuDO>
     * @author ljx
     * @time 2024/1/11 14:37
     */
    List<Menu> listMenuByRoleId(Integer roleId);

    /**
     * 查询所有权限id
     *
     * @param
     * @return java.util.List<java.lang.Integer>
     * @author ljx
     * @time 2024/1/12 10:41
     */
    List<Integer> allMenuId();

    /**
     * 按指定条件统计数量
     *
     * @param menuSearchDTO
     * @return java.lang.Integer
     * @author ljx
     * @time 2024/1/12 17:07
     */
    Integer countByCondition(MenuSearchDTO menuSearchDTO);
}
